package com.muyu.danmo.service.impl;


import com.muyu.danmo.domain.DanmoMountWorks;
import com.muyu.danmo.mapper.DanmoMountWorksMapper;
import com.muyu.danmo.service.IDanmoMountWorksService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 装裱作品Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-21
 */
@Service
public class DanmoMountWorksServiceImpl implements IDanmoMountWorksService
{
    @Autowired
    private DanmoMountWorksMapper danmoMountWorksMapper;

    /**
     * 查询装裱作品
     *
     * @param id 装裱作品主键
     * @return 装裱作品
     */
    @Override
    public DanmoMountWorks selectDanmoMountWorksById(Long id)
    {
        return danmoMountWorksMapper.selectDanmoMountWorksById(id);
    }

    /**
     * 查询装裱作品列表
     *
     * @param danmoMountWorks 装裱作品
     * @return 装裱作品
     */
    @Override
    public List<DanmoMountWorks> selectDanmoMountWorksList(DanmoMountWorks danmoMountWorks)
    {
        return danmoMountWorksMapper.selectDanmoMountWorksList(danmoMountWorks);
    }

    /**
     * 新增装裱作品
     *
     * @param danmoMountWorks 装裱作品
     * @return 结果
     */
    @Override
    public int insertDanmoMountWorks(DanmoMountWorks danmoMountWorks)
    {
        return danmoMountWorksMapper.insertDanmoMountWorks(danmoMountWorks);
    }

    /**
     * 修改装裱作品
     *
     * @param danmoMountWorks 装裱作品
     * @return 结果
     */
    @Override
    public int updateDanmoMountWorks(DanmoMountWorks danmoMountWorks)
    {
        return danmoMountWorksMapper.updateDanmoMountWorks(danmoMountWorks);
    }

    /**
     * 批量删除装裱作品
     *
     * @param ids 需要删除的装裱作品主键
     * @return 结果
     */
    @Override
    public int deleteDanmoMountWorksByIds(Long[] ids)
    {
        return danmoMountWorksMapper.deleteDanmoMountWorksByIds(ids);
    }

    /**
     * 删除装裱作品信息
     *
     * @param id 装裱作品主键
     * @return 结果
     */
    @Override
    public int deleteDanmoMountWorksById(Long id)
    {
        return danmoMountWorksMapper.deleteDanmoMountWorksById(id);
    }
}
